package edu.nf.exam.controller;

import edu.nf.exam.entity.UserTaskInfo;
import edu.nf.exam.service.UserTaskService;
import edu.nf.exam.service.impl.UserTaskServiceImpl;
import org.nf.mvc.annotation.RequestMapping;
import org.nf.mvc.servlet.View;
import org.nf.mvc.view.JsonView;

/**
 * @Author : LLH
 * @create 2021/7/19
 */
public class UserTaskController extends BaseController{
    /**
     * 修改
     * @return
     */
    @RequestMapping("/userTask/update")
    public View update(UserTaskInfo userTaskInfo){
        UserTaskService service=new UserTaskServiceImpl();
        try {
            service.update(userTaskInfo);
            return new JsonView(success());
        } catch (Exception e) {
            e.printStackTrace();
            return new JsonView(fail(500,e.getMessage()));
        }
    }
}
